<template>
  <div class="t_body">
    <jf-header :viewstyle="viewstyle"></jf-header>
    <el-row>
      <el-col :span="20" :offset="2"><router-view></router-view></el-col>
    </el-row>

    <jf-footer></jf-footer>
  </div>
</template>

<script>
import JfFooter from "@/components/JfFooter.vue";
import JfHeader from "@/components/JfHeader.vue";

export default {
  name: "",
  data() {
    return {
      viewstyle: "shop_s",
      showOrder: {},
    };
  },
  components: {
    JfFooter,
    JfHeader,
  },
  methods: {
    next() {
      if (this.active++ > 2) this.active = 0;
    },
    last() {
      if (this.active-- < 0) this.active = 0;
    },
    onEmitActive(i) {
      this.active = i;
      this.showAddressList();
    },
    showAddressList() {
      this.$axios
        .get("/order", {})
        .then((res) => {
          if (res.data.meta.status == 200) {
            this.showOrder = res.data.data;
            console.log(this.showOrder);
          } else {
            return this.$message({ message: res.data.meta.msg, type: "error" });
          }
        })
        .catch((res) => {
          console.log(res);
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
  },
};
</script>

<style scoped>
.el-col {
  min-height: 100px;
}
</style>